Integrand size = 31, antiderivative size = 252 \[ \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx=\frac {a \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} (a+b)^{7/2} d}-\frac {\left (A b^2+a^2 C\right ) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a \left (5 A b^2-a^2 C+6 b^2 C\right ) \tan (c+d x)}{6 b \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {\left (a^4 C-2 b^4 (2 A+3 C)-a^2 b^2 (11 A+10 C)\right ) \tan (c+d x)}{6 b \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))} \]
a*(a^2*(2*A+C)+b^2*(3*A+4*C))*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b) ^(1/2))/(a-b)^(7/2)/(a+b)^(7/2)/d-1/3*(A*b^2+C*a^2)*tan(d*x+c)/b/(a^2-b^2) /d/(a+b*sec(d*x+c))^3-1/6*a*(5*A*b^2-C*a^2+6*C*b^2)*tan(d*x+c)/b/(a^2-b^2) ^2/d/(a+b*sec(d*x+c))^2+1/6*(a^4*C-2*b^4*(2*A+3*C)-a^2*b^2*(11*A+10*C))*ta n(d*x+c)/b/(a^2-b^2)^3/d/(a+b*sec(d*x+c))
Result contains complex when optimal does not.
Time = 6.24 (sec) , antiderivative size = 438, normalized size of antiderivative = 1.74 \[ \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx=\frac {(b+a \cos (c+d x)) \sec ^2(c+d x) \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {6 i a \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \arctan \left (\frac {(i \cos (c)+\sin (c)) \left (a \sin (c)+(-b+a \cos (c)) \tan \left (\frac {d x}{2}\right )\right )}{\sqrt {a^2-b^2} \sqrt {(\cos (c)-i \sin (c))^2}}\right ) (b+a \cos (c+d x))^3 (\cos (c)-i \sin (c))}{\left (a^2-b^2\right )^{7/2} \sqrt {(\cos (c)-i \sin (c))^2}}+\frac {2 b \left (A b^2+a^2 C\right ) \sec (c) (b \sin (c)-a \sin (d x))}{a^5-a^3 b^2}+\frac {(b+a \cos (c+d x)) \sec (c) \left (\left (-11 a^2 A b^3+6 A b^5-5 a^4 b C\right ) \sin (c)+a \left (-4 A b^4+3 a^4 C+a^2 b^2 (9 A+2 C)\right ) \sin (d x)\right )}{a^3 \left (a^2-b^2\right )^2}+\frac {(b+a \cos (c+d x))^2 \sec (c) \left (3 \left (-6 a^2 A b^4+2 A b^6+a^6 C+a^4 b^2 (9 A+4 C)\right ) \sin (c)-a b \left (2 A b^4+a^2 b^2 (-5 A+2 C)+a^4 (18 A+13 C)\right ) \sin (d x)\right )}{\left (a^3-a b^2\right )^3}\right )}{3 d (A+2 C+A \cos (2 (c+d x))) (a+b \sec (c+d x))^4} \]
((b + a*Cos[c + d*x])*Sec[c + d*x]^2*(A + C*Sec[c + d*x]^2)*(((-6*I)*a*(a^ 2*(2*A + C) + b^2*(3*A + 4*C))*ArcTan[((I*Cos[c] + Sin[c])*(a*Sin[c] + (-b + a*Cos[c])*Tan[(d*x)/2]))/(Sqrt[a^2 - b^2]*Sqrt[(Cos[c] - I*Sin[c])^2])] *(b + a*Cos[c + d*x])^3*(Cos[c] - I*Sin[c]))/((a^2 - b^2)^(7/2)*Sqrt[(Cos[ c] - I*Sin[c])^2]) + (2*b*(A*b^2 + a^2*C)*Sec[c]*(b*Sin[c] - a*Sin[d*x]))/ (a^5 - a^3*b^2) + ((b + a*Cos[c + d*x])*Sec[c]*((-11*a^2*A*b^3 + 6*A*b^5 - 5*a^4*b*C)*Sin[c] + a*(-4*A*b^4 + 3*a^4*C + a^2*b^2*(9*A + 2*C))*Sin[d*x] ))/(a^3*(a^2 - b^2)^2) + ((b + a*Cos[c + d*x])^2*Sec[c]*(3*(-6*a^2*A*b^4 + 2*A*b^6 + a^6*C + a^4*b^2*(9*A + 4*C))*Sin[c] - a*b*(2*A*b^4 + a^2*b^2*(- 5*A + 2*C) + a^4*(18*A + 13*C))*Sin[d*x]))/(a^3 - a*b^2)^3))/(3*d*(A + 2*C + A*Cos[2*(c + d*x)])*(a + b*Sec[c + d*x])^4)
Time = 1.25 (sec) , antiderivative size = 291, normalized size of antiderivative = 1.15, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.452, Rules used = {3042, 4569, 25, 3042, 4491, 25, 3042, 4491, 27, 3042, 4318, 3042, 3138, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (A+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^4}dx\) |
\(\Big \downarrow \) 4569 |
\(\displaystyle -\frac {\int -\frac {\sec (c+d x) \left (3 a b (A+C)-\left (-C a^2+2 A b^2+3 b^2 C\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^3}dx}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\sec (c+d x) \left (3 a b (A+C)-\left (2 A b^2-\left (a^2-3 b^2\right ) C\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^3}dx}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (3 a b (A+C)+\left (\left (a^2-3 b^2\right ) C-2 A b^2\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4491 |
\(\displaystyle \frac {-\frac {\int -\frac {\sec (c+d x) \left (2 b \left ((3 A+2 C) a^2+b^2 (2 A+3 C)\right )-a \left (-C a^2+5 A b^2+6 b^2 C\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^2}dx}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {\sec (c+d x) \left (2 b \left ((3 A+2 C) a^2+b^2 (2 A+3 C)\right )-a \left (-C a^2+5 A b^2+6 b^2 C\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^2}dx}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (2 b \left ((3 A+2 C) a^2+b^2 (2 A+3 C)\right )-a \left (-C a^2+5 A b^2+6 b^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4491 |
\(\displaystyle \frac {\frac {\frac {\left (a^4 C-a^2 b^2 (11 A+10 C)-2 b^4 (2 A+3 C)\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}-\frac {\int -\frac {3 a b \left ((2 A+C) a^2+b^2 (3 A+4 C)\right ) \sec (c+d x)}{a+b \sec (c+d x)}dx}{a^2-b^2}}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\frac {3 a b \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{a^2-b^2}+\frac {\left (a^4 C-a^2 b^2 (11 A+10 C)-2 b^4 (2 A+3 C)\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {3 a b \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}+\frac {\left (a^4 C-a^2 b^2 (11 A+10 C)-2 b^4 (2 A+3 C)\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {\frac {\frac {3 a \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{a^2-b^2}+\frac {\left (a^4 C-a^2 b^2 (11 A+10 C)-2 b^4 (2 A+3 C)\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {3 a \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{a^2-b^2}+\frac {\left (a^4 C-a^2 b^2 (11 A+10 C)-2 b^4 (2 A+3 C)\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {\frac {6 a \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{d \left (a^2-b^2\right )}+\frac {\left (a^4 C-a^2 b^2 (11 A+10 C)-2 b^4 (2 A+3 C)\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\frac {6 a b \left (a^2 (2 A+C)+b^2 (3 A+4 C)\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )}+\frac {\left (a^4 C-a^2 b^2 (11 A+10 C)-2 b^4 (2 A+3 C)\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {a \left (5 A b^2-C \left (a^2-6 b^2\right )\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
-1/3*((A*b^2 + a^2*C)*Tan[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^ 3) + (-1/2*(a*(5*A*b^2 - (a^2 - 6*b^2)*C)*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x])^2) + ((6*a*b*(a^2*(2*A + C) + b^2*(3*A + 4*C))*ArcTanh[( Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(a^2 - b^2)*d) + ((a^4*C - 2*b^4*(2*A + 3*C) - a^2*b^2*(11*A + 10*C))*Tan[c + d *x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x])))/(2*(a^2 - b^2)))/(3*b*(a^2 - b^ 2))
3.8.1.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Simp[1 /((m + 1)*(a^2 - b^2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp [(a*A - b*B)*(m + 1) - (A*b - a*B)*(m + 2)*Csc[e + f*x], x], x], x] /; Free Q[{a, b, A, B, e, f}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && LtQ[m , -1]
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[ (e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-(A*b^2 + a^2*C) )*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^( m + 1)*Simp[a*b*(A + C)*(m + 1) - (A*b^2 + a^2*C + b*(A*b + b*C)*(m + 1))*C sc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C}, x] && LtQ[m, -1] && Ne Q[a^2 - b^2, 0]
Time = 0.63 (sec) , antiderivative size = 373, normalized size of antiderivative = 1.48
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (-\frac {\left (6 A \,a^{2} b +3 a A \,b^{2}+2 A \,b^{3}+a^{3} C +6 a^{2} b C +2 C a \,b^{2}+2 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {2 \left (9 a^{2} A +A \,b^{2}+7 C \,a^{2}+3 C \,b^{2}\right ) b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (6 A \,a^{2} b -3 a A \,b^{2}+2 A \,b^{3}-a^{3} C +6 a^{2} b C -2 C a \,b^{2}+2 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}+\frac {a \left (2 a^{2} A +3 A \,b^{2}+C \,a^{2}+4 C \,b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(373\) |
default | \(\frac {-\frac {2 \left (-\frac {\left (6 A \,a^{2} b +3 a A \,b^{2}+2 A \,b^{3}+a^{3} C +6 a^{2} b C +2 C a \,b^{2}+2 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {2 \left (9 a^{2} A +A \,b^{2}+7 C \,a^{2}+3 C \,b^{2}\right ) b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (6 A \,a^{2} b -3 a A \,b^{2}+2 A \,b^{3}-a^{3} C +6 a^{2} b C -2 C a \,b^{2}+2 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}+\frac {a \left (2 a^{2} A +3 A \,b^{2}+C \,a^{2}+4 C \,b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(373\) |
risch | \(\text {Expression too large to display}\) | \(1311\) |
1/d*(-2*(-1/2*(6*A*a^2*b+3*A*a*b^2+2*A*b^3+C*a^3+6*C*a^2*b+2*C*a*b^2+2*C*b ^3)/(a-b)/(a^3+3*a^2*b+3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5+2/3*(9*A*a^2+A*b^ 2+7*C*a^2+3*C*b^2)*b/(a^2+2*a*b+b^2)/(a^2-2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3- 1/2*(6*A*a^2*b-3*A*a*b^2+2*A*b^3-C*a^3+6*C*a^2*b-2*C*a*b^2+2*C*b^3)/(a+b)/ (a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+1/2*c)^2*a-tan( 1/2*d*x+1/2*c)^2*b-a-b)^3+a*(2*A*a^2+3*A*b^2+C*a^2+4*C*b^2)/(a^6-3*a^4*b^2 +3*a^2*b^4-b^6)/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b )*(a-b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 528 vs. \(2 (236) = 472\).
Time = 0.36 (sec) , antiderivative size = 1114, normalized size of antiderivative = 4.42 \[ \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx=\text {Too large to display} \]
[-1/12*(3*((2*A + C)*a^3*b^3 + (3*A + 4*C)*a*b^5 + ((2*A + C)*a^6 + (3*A + 4*C)*a^4*b^2)*cos(d*x + c)^3 + 3*((2*A + C)*a^5*b + (3*A + 4*C)*a^3*b^3)* cos(d*x + c)^2 + 3*((2*A + C)*a^4*b^2 + (3*A + 4*C)*a^2*b^4)*cos(d*x + c)) *sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*co s(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) - 2*(C*a^6*b - 11*(A + C)*a^4*b^ 3 + (7*A + 4*C)*a^2*b^5 + 2*(2*A + 3*C)*b^7 - ((18*A + 13*C)*a^6*b - (23*A + 11*C)*a^4*b^3 + (7*A - 2*C)*a^2*b^5 - 2*A*b^7)*cos(d*x + c)^2 + 3*(C*a^ 7 - (9*A + 10*C)*a^5*b^2 + (8*A + 7*C)*a^3*b^4 + (A + 2*C)*a*b^6)*cos(d*x + c))*sin(d*x + c))/((a^11 - 4*a^9*b^2 + 6*a^7*b^4 - 4*a^5*b^6 + a^3*b^8)* d*cos(d*x + c)^3 + 3*(a^10*b - 4*a^8*b^3 + 6*a^6*b^5 - 4*a^4*b^7 + a^2*b^9 )*d*cos(d*x + c)^2 + 3*(a^9*b^2 - 4*a^7*b^4 + 6*a^5*b^6 - 4*a^3*b^8 + a*b^ 10)*d*cos(d*x + c) + (a^8*b^3 - 4*a^6*b^5 + 6*a^4*b^7 - 4*a^2*b^9 + b^11)* d), 1/6*(3*((2*A + C)*a^3*b^3 + (3*A + 4*C)*a*b^5 + ((2*A + C)*a^6 + (3*A + 4*C)*a^4*b^2)*cos(d*x + c)^3 + 3*((2*A + C)*a^5*b + (3*A + 4*C)*a^3*b^3) *cos(d*x + c)^2 + 3*((2*A + C)*a^4*b^2 + (3*A + 4*C)*a^2*b^4)*cos(d*x + c) )*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b ^2)*sin(d*x + c))) + (C*a^6*b - 11*(A + C)*a^4*b^3 + (7*A + 4*C)*a^2*b^5 + 2*(2*A + 3*C)*b^7 - ((18*A + 13*C)*a^6*b - (23*A + 11*C)*a^4*b^3 + (7*A - 2*C)*a^2*b^5 - 2*A*b^7)*cos(d*x + c)^2 + 3*(C*a^7 - (9*A + 10*C)*a^5*b...
\[ \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx=\int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{4}}\, dx \]
Exception generated. \[ \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 693 vs. \(2 (236) = 472\).
Time = 0.37 (sec) , antiderivative size = 693, normalized size of antiderivative = 2.75 \[ \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx=-\frac {\frac {3 \, {\left (2 \, A a^{3} + C a^{3} + 3 \, A a b^{2} + 4 \, C a b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} \sqrt {-a^{2} + b^{2}}} - \frac {3 \, C a^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, A a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, C a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 27 \, A a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 27 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, A a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, A a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, C a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, A b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 36 \, A a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 28 \, C a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 32 \, A a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 16 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, A b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, C b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C a^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, A a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, C a^{4} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 27 \, A a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 27 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, A a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, A b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, C b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )}^{3}}}{3 \, d} \]
-1/3*(3*(2*A*a^3 + C*a^3 + 3*A*a*b^2 + 4*C*a*b^2)*(pi*floor(1/2*(d*x + c)/ pi + 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*sqrt(-a^ 2 + b^2)) - (3*C*a^5*tan(1/2*d*x + 1/2*c)^5 + 18*A*a^4*b*tan(1/2*d*x + 1/2 *c)^5 + 12*C*a^4*b*tan(1/2*d*x + 1/2*c)^5 - 27*A*a^3*b^2*tan(1/2*d*x + 1/2 *c)^5 - 27*C*a^3*b^2*tan(1/2*d*x + 1/2*c)^5 + 6*A*a^2*b^3*tan(1/2*d*x + 1/ 2*c)^5 + 12*C*a^2*b^3*tan(1/2*d*x + 1/2*c)^5 - 3*A*a*b^4*tan(1/2*d*x + 1/2 *c)^5 - 6*C*a*b^4*tan(1/2*d*x + 1/2*c)^5 + 6*A*b^5*tan(1/2*d*x + 1/2*c)^5 + 6*C*b^5*tan(1/2*d*x + 1/2*c)^5 - 36*A*a^4*b*tan(1/2*d*x + 1/2*c)^3 - 28* C*a^4*b*tan(1/2*d*x + 1/2*c)^3 + 32*A*a^2*b^3*tan(1/2*d*x + 1/2*c)^3 + 16* C*a^2*b^3*tan(1/2*d*x + 1/2*c)^3 + 4*A*b^5*tan(1/2*d*x + 1/2*c)^3 + 12*C*b ^5*tan(1/2*d*x + 1/2*c)^3 - 3*C*a^5*tan(1/2*d*x + 1/2*c) + 18*A*a^4*b*tan( 1/2*d*x + 1/2*c) + 12*C*a^4*b*tan(1/2*d*x + 1/2*c) + 27*A*a^3*b^2*tan(1/2* d*x + 1/2*c) + 27*C*a^3*b^2*tan(1/2*d*x + 1/2*c) + 6*A*a^2*b^3*tan(1/2*d*x + 1/2*c) + 12*C*a^2*b^3*tan(1/2*d*x + 1/2*c) + 3*A*a*b^4*tan(1/2*d*x + 1/ 2*c) + 6*C*a*b^4*tan(1/2*d*x + 1/2*c) + 6*A*b^5*tan(1/2*d*x + 1/2*c) + 6*C *b^5*tan(1/2*d*x + 1/2*c))/((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*(a*tan(1/2 *d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 - a - b)^3))/d
Time = 21.14 (sec) , antiderivative size = 483, normalized size of antiderivative = 1.92 \[ \int \frac {\sec (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^4} \, dx=-\frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (2\,A\,b^3+C\,a^3+2\,C\,b^3+3\,A\,a\,b^2+6\,A\,a^2\,b+2\,C\,a\,b^2+6\,C\,a^2\,b\right )}{{\left (a+b\right )}^3\,\left (a-b\right )}-\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A\,b^3+3\,C\,b^3+9\,A\,a^2\,b+7\,C\,a^2\,b\right )}{3\,{\left (a+b\right )}^2\,\left (a^2-2\,a\,b+b^2\right )}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,A\,b^3-C\,a^3+2\,C\,b^3-3\,A\,a\,b^2+6\,A\,a^2\,b-2\,C\,a\,b^2+6\,C\,a^2\,b\right )}{\left (a+b\right )\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (-3\,a^3-3\,a^2\,b+3\,a\,b^2+3\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-3\,a^3+3\,a^2\,b+3\,a\,b^2-3\,b^3\right )+3\,a\,b^2+3\,a^2\,b+a^3+b^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )\right )}-\frac {a\,\mathrm {atan}\left (\frac {1{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4-4{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3\,b+6{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^2-4{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^3+1{}\mathrm {i}\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^4}{\sqrt {a+b}\,{\left (a-b\right )}^{7/2}}\right )\,\left (2\,A\,a^2+3\,A\,b^2+C\,a^2+4\,C\,b^2\right )\,1{}\mathrm {i}}{d\,{\left (a+b\right )}^{7/2}\,{\left (a-b\right )}^{7/2}} \]
- ((tan(c/2 + (d*x)/2)^5*(2*A*b^3 + C*a^3 + 2*C*b^3 + 3*A*a*b^2 + 6*A*a^2* b + 2*C*a*b^2 + 6*C*a^2*b))/((a + b)^3*(a - b)) - (4*tan(c/2 + (d*x)/2)^3* (A*b^3 + 3*C*b^3 + 9*A*a^2*b + 7*C*a^2*b))/(3*(a + b)^2*(a^2 - 2*a*b + b^2 )) + (tan(c/2 + (d*x)/2)*(2*A*b^3 - C*a^3 + 2*C*b^3 - 3*A*a*b^2 + 6*A*a^2* b - 2*C*a*b^2 + 6*C*a^2*b))/((a + b)*(3*a*b^2 - 3*a^2*b + a^3 - b^3)))/(d* (tan(c/2 + (d*x)/2)^2*(3*a*b^2 - 3*a^2*b - 3*a^3 + 3*b^3) - tan(c/2 + (d*x )/2)^4*(3*a*b^2 + 3*a^2*b - 3*a^3 - 3*b^3) + 3*a*b^2 + 3*a^2*b + a^3 + b^3 - tan(c/2 + (d*x)/2)^6*(3*a*b^2 - 3*a^2*b + a^3 - b^3))) - (a*atan((a^4*t an(c/2 + (d*x)/2)*1i + b^4*tan(c/2 + (d*x)/2)*1i - a*b^3*tan(c/2 + (d*x)/2 )*4i - a^3*b*tan(c/2 + (d*x)/2)*4i + a^2*b^2*tan(c/2 + (d*x)/2)*6i)/((a + b)^(1/2)*(a - b)^(7/2)))*(2*A*a^2 + 3*A*b^2 + C*a^2 + 4*C*b^2)*1i)/(d*(a + b)^(7/2)*(a - b)^(7/2))